<template>
  <div class="box">
    <el-form-item label="文本内容">
      <el-input v-model="subtext"> </el-input>
    </el-form-item>
    <el-form-item label="文本颜色">
      <el-color-picker show-alpha v-model="subtextStyle.color">
      </el-color-picker>
    </el-form-item>
    <el-form-item label="文本字号">
      <el-input-number
        v-model="subtextStyle.fontSize"
        :max="99"
        :min="10"
        :step="1"
      >
      </el-input-number>
    </el-form-item>
  </div>
</template>


<script>
export default {
  name: "SubText",
  inject: ["father"],
  computed: {
    subtextStyle: {
      get() {
        return this.father.echartsOptions.title.textStyle;
      },
      set(val) {
        this.father.echartsOptions.title.textStyle = val;
      },
    },
    subtext: {
      get() {
        return this.father.echartsOptions.title.subtext;
      },
      set(val) {
        this.father.echartsOptions.title.subtext = val;
      },
    },
  },
  mounted() {},
  methods: {},
};
</script>

<style scoped>
</style>